import java.util.Scanner;

public class Task02 {
    public static void main(String[] args) {
        int BigCount=0;
        int SmallCount=0;
        int NumCount=0;
        int OtherCount=0;

        System.out.println("请输入一字符串：");
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();

        for (int i=0;i<s.length();i++){
            char c = s.charAt(i);
            if (c >= 'A' && c <= 'Z'){
                BigCount++;
            }else if (c >= 'a' && c <= 'z'){
                SmallCount++;
            }else if (c >= '0' && c <= '9'){
                NumCount++;
            }else{
                OtherCount++;
            }
            }
        System.out.println("大写"+BigCount+"个");
        System.out.println("小写"+SmallCount+"个");
        System.out.println("数字"+NumCount+"个");
        System.out.println("其他字符"+OtherCount+"个");
        }
    }

